package edu.sctu.practice.class02.luohui.test12;

/**
 * Created by asus on 2015/10/15.
 */
public class Bus {
    int number,speed;
    String color;
    double weight;

    public Bus(int number, String color, double weight) {
        this.number = number;
        this.color = color;
        this.weight = weight;
        System.out.println("汽车的轮子个数是："+number+"\n汽车的颜色是："+color+"\n汽车的质量是："+weight);
    }
    public Bus(int number, String color) {
        this.number = number;
        this.color = color;
        System.out.println("汽车的轮子个数是："+number+"\n汽车的颜色是："+color);
    }
    public void accBus(int speed){
        this.speed+=speed;
        System.out.println("汽车加速:"+speed);

    }
    public void decBus(int speed){
        this.speed-=speed;
        System.out.println("汽车减速："+speed);

    }
    public void stop(int speed){
        this.speed=0;
        System.out.println("汽车停止："+speed);

    }
}
